package nowcoder.day_48.day1;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * OR63 删除公共字符
 */
public class Num2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s1 = in.nextLine();
        String s2 = in.nextLine();
        StringBuilder sb = new StringBuilder();
        Set<Character>set = new HashSet<>();
        for (int i = 0; i < s2.length(); i++) {
            set.add(s2.charAt(i));
        }
        for(int i = 0 ; i < s1.length() ;i++){
            char ch = s1.charAt(i);
            if(!set.contains(ch)){
                sb.append(ch);
            }
        }
        System.out.println(sb.toString());
    }
}
